package @{servicePkg};

import java.util.List;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.zzwtec.common.constant.AppName;
import com.zzwtec.interfaces.Page;
import com.zzwtec.interfaces.RequestObject;
import com.zzwtec.interfaces.ResultObject;
import @{dtoPkg}.@{EntityModel}DTO;

<?
var date = date();
?>
/**
 * @FeignClient需要指向接口实现者的应用名比如(com.zzwtec.information)
 * @author  草原狼
 * 
 * @{date,'yyyy年MM月dd日'}
 */
@FeignClient(@{applicationName})
@RequestMapping("@{EntityModel}Service")
public interface @{EntityModel}Service {

	/**
	 * 添加@{EntityModel}
	 * 
	 * @param bean
	 * @return 
	 */
	@RequestMapping(value = "add@{EntityModel}", method = RequestMethod.POST)
	public ResultObject<String> add@{EntityModel}(@RequestBody RequestObject<@{EntityModel}DTO> request);

	/**
	 * 按id删除@{EntityModel}
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "remove@{EntityModel}", method = RequestMethod.POST)
	public ResultObject<Void> remove@{EntityModel}(@RequestBody RequestObject<String> id);

	/**
	 * 按ids删除@{EntityModel}
	 * 
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "remove@{EntityModel}ByIds", method = RequestMethod.POST)
	public ResultObject<Void> remove@{EntityModel}ByIds(@RequestBody RequestObject<String[]> request);
	
	/**
	 * 修改@{EntityModel}
	 * @param bean
	 * @return
	 */	
	@RequestMapping(value = "modify@{EntityModel}", method = RequestMethod.POST)
	public ResultObject<Void> modify@{EntityModel}(@RequestBody RequestObject<@{EntityModel}DTO> request);

	/**
	 * 查询所有@{EntityModel}
	 * 
	 * @return
	 */	
	@RequestMapping(value = "queryAll@{EntityModel}", method = RequestMethod.POST)
	public ResultObject<List<@{EntityModel}DTO>> queryAll@{EntityModel}(@RequestBody RequestObject<Void> request);

	/**
	 * 根据id查询@{EntityModel}
	 * 
	 * @param id
	 * @return
	 */	
	@RequestMapping(value = "query@{EntityModel}ById", method = RequestMethod.POST)
	public ResultObject<@{EntityModel}DTO> query@{EntityModel}ById(@RequestBody RequestObject<String> request);
	
	
	
	/**
     * 获取分页@{EntityModel}数据
     * @param page 分页数据
     * @return 区域分页数据
     */	
	@RequestMapping(value = "query@{EntityModel}ByPage", method = RequestMethod.POST)
	public ResultObject<Page<@{EntityModel}DTO>> query@{EntityModel}ByPage(@RequestBody RequestObject<Page<@{EntityModel}DTO>> request);

	/**
	 * 本地服务实例的信息
	 * @return ServiceInstance
	 */
	@RequestMapping(value = "instance-info", method = RequestMethod.GET)
	public ServiceInstance showServiceInfo();
}
